package thread;

public class CurrentThreadDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println("主线程"+main);
        dosome();
        Thread t = new Thread(){
        public void run () {
            Thread t = Thread.currentThread();
            System.out.println("自定义线程"+t);
            dosome();
        }
        };
    }
    public static void dosome(){
        Thread t = Thread.currentThread();
        System.out.println("运行dosome的线程是"+t);
    }
}
